<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    <head>
        <?php include_http_metas() ?>
        <?php include_metas() ?>
        <title>Porba - Easy ERP</title>
        <link rel="shortcut icon" href="/favicon.ico" />
        <?php include_stylesheets() ?>
        <?php include_javascripts() ?>
        <script type="text/javascript">
            function startTime()
            {
                var today=new Date();
                var h=today.getHours();
                var m=today.getMinutes();
                var s=today.getSeconds();
                // add a zero in front of numbers<10
                m=checkTime(m);
                s=checkTime(s);
                document.getElementById('txt').innerHTML=h+":"+m+":"+s;
                t=setTimeout('startTime()',500);
            }

            function checkTime(i)
            {
                if (i<10)
                {
                    i="0" + i;
                }
                return i;
            }
        </script>
    </head>
    <body onload="startTime()">
        <div id="top">
            <div id="log">
                <p>Username</p>
                <ul>
                    <a href=""><li><img src="<?php echo image_path('Buttons/bt_log_edit.png') ?>" onmouseover="this.src='<?php echo image_path('Buttons/bt_log_edit_hov.png') ?>'" onmouseout="this.src='<?php echo image_path('Buttons/bt_log_edit.png') ?>'" alt="Help"/></li></a>
                    <a href=""><li><img src="<?php echo image_path('Buttons/bt_log_logout.png') ?>" onmouseover="this.src='<?php echo image_path('Buttons/bt_log_logout_hov.png') ?>'" onmouseout="this.src='<?php echo image_path('Buttons/bt_log_logout.png') ?>'" alt="Help"/></li></a>
                </ul>
            </div>
            <div id="clock">
                <div id="ClockTime" ><div id="txt"></div></div>
            </div>
            <div id="calendar">
                <div id="bg_calendar">
                    <?php
                    //date_default_timezone_set(Europe/Amsterdam); //set time zone - NEEDS TO BE INSTALLED/can be changed!
                    $date = getdate(); //get the date
                    $month = $date['month']; //get month
                    $day = $date['mday']; //get day
                    echo '<p id="datemonth">' . $month . '</p>'; //the current month
                    echo '<p id="dateday">' . $day . '</p>'; //the current date
                    ?>
                </div>
                <div id="bg_rings"></div>
            </div>
            <div id="logo"></div>
        </div><!-- close top -->
        <div id="help">
            <a href=""><img src="<?php echo image_path('Buttons/bt_help.png') ?>" onmouseover="this.src='<?php echo image_path('Buttons/bt_help_hov.png') ?>'" onmouseout="this.src='<?php echo image_path('Buttons/bt_help.png') ?>'" alt="Help"/></a>
        </div>
        <ul>
          <li>
            <?php echo link_to('Contacts', 'contact') ?>
          </li>
          <li>
            <?php echo link_to('Orders', '_order') ?>
          </li>
          <li>
            <?php echo link_to('Parta', 'part') ?>
          </li>
          <li>
            <?php echo link_to('Products', 'product') ?>
          </li>
          <li>
            <?php echo link_to('Categories Contacts', 'category_contact') ?>
          </li>
          <li>
            <?php echo link_to('Categories Orders', 'category_order') ?>
          </li>
        </ul>
        <?php echo $sf_content ?>
    </body>
</html>